package org.bastion.query;

import java.util.Map;

import org.bastion.adapter.QueryAdapter;
import org.bastion.service.QueryService;

/**
 * Encapsulates a query for domain objects from a persistent store outside the
 * domain. Queries can be specified using either a Predicate/Specification
 * pattern, or a query name. Some persistency services will be able to query by
 * Predicate; others will query using a named query; still others will support
 * both. Therefore, ideally a query will be specified using both methods. The
 * {@link QueryAdapter} will ask the {@link QueryService} which method is
 * supported or preferred.
 * 
 * @author Danny Lagrouw
 * 
 * @param <T>
 */
public interface IDomainQuery<T extends Object> {

	public abstract Class<T> getDomainClass();

	public abstract Matcher<T> getMatcher();

	public abstract String getName();

	public abstract Map<String, Object> getParameters();

	public abstract boolean hasMatcher();

}